<template lang="html">
    <div class="guide">
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item><i class="el-icon-message"></i>&nbsp;网站操作指南列表</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="container">
            <el-table :data="guideList" style="width: 100%" v-loading="loading">
                <el-table-column prop="id" label="ID" width="100"></el-table-column>
                <el-table-column prop="name" label="标题" width="300" align="center"></el-table-column>
                <!-- <el-table-column prop="content_cn" label="内容(中文)" width="380" align="center">
                    <template slot-scope="scope" >
                        <div v-html="scope.row.content_cn"></div>
                    </template>
                </el-table-column>
                <el-table-column prop="content_en" label="内容(英文)" width="380" align="center">
                    <template slot-scope="scope" >
                        <div v-html="scope.row.content_en"></div>
                    </template>
                </el-table-column> -->
                <el-table-column label="操作" align="center">
                    <template slot-scope="scope" >
                        <el-button class="del"  size="small" type="text"  @click="changeAmendCn(scope.row)" >修改中文</el-button>
                        <el-button class="del"  size="small" type="text"  @click="changeAmendEn(scope.row)" >修改英文</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
import {getGuideList} from '@/api/guide/list'
    export default {
        name: "guide",
        data() {
            return {
                loading:true,//加载中
               guideList:[],//操作指南列表
            }
        },
        created(){
           this.getGuideList();
        },
        mounted() {
            
        },
        methods: {
            //获取列表
            getGuideList(){
                getGuideList().then(res => {
                    // console.log(res);
                    this.loading = false;//加载中
                    this.guideList = res.data;
                })
            },
            //跳转修改页,中文
            changeAmendCn(ev){
                // console.log(ev);
                this.$router.push({ path: '/guide/EditCn',query:{id:ev.id}});
            },
            //跳转修改页,英文
            changeAmendEn(ev){
                // console.log(ev);
                this.$router.push({ path: '/guide/EditEn',query:{id:ev.id}});
            },
        }
    }
</script>

<style lang="css">

</style>
